# Maintainer: Rydia <rydia@member.fsf.org>
pkgname=ibus-table
pkgver=1.14.1
pkgrel=0
pkgdesc="Next Generation Input Bus for Linux"
url="https://github.com/kaio/ibus-table"
arch="all"
license="LGPL-2.1-or-later"
depends="
	ibus
"
makedepends="
	ibus-dev autoconf automake
"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/kaio/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz
"
install="$pkgname.post-install"

prepare() {
	# Fix all shebangs from 'python' to 'python3'
	grep -r -l '#!/usr/bin/python' . | xargs sed -i '1s|python|python3|'

	default_prepare
}

build() {
	./autogen.sh \
		--prefix=/usr \
		--libexecdir=/usr/lib/ibus \
		--sysconfdir=/etc
	make
}

package() {
	make DESTDIR="$pkgdir" install
	gzip $pkgdir/usr/share/man/man1/ibus-table-createdb.1
}

sha512sums="
a658c2d370d173d2fe2f38c02c6b822a17771754ac98a856f954c4c998e90a857f9d54ed652c74159af9545d445001d202e7b5578e7694f8767f928b42db9055  ibus-table-1.14.1.tar.gz
"
